import request from "@/utils/request";

/**
 * 获取图片验证码方法
 * @returns 
 */
export const getPicCode = () => {
    return request.get('/captcha/image')
}

/**
 * 获取手机验证码方法
 * @param {*} moblie 
 */
export const getSmsCode = (captchaCode, captchaKey, mobile) => {
    return request.post('/captcha/sendSmsCaptcha', {
        form: {
            captchaCode,
            captchaKey,
            mobile
        }
    })
}

/**
 * 登录方法
 * @param {} mobile 
 * @param {*} smsCode 
 */
export const login = (mobile, smsCode) => {
    return request.post('/passport/login', {
        form: {
            isParty: false,
            partyData: {},
            mobile,
            smsCode
        }
    })
}